<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Open-Api</title>
</head>
<script>
    //获取url参数
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substring(1).match(reg);  //匹配目标参数
        if (r != null) return unescape(r[2]);
        return null; //返回参数值
    }

    //自动跳转至 /doc.html
    if (getUrlParam("ip") == null) {
        window.location.href = "/doc.html";
    }

</script>
<body>
<h1>Open-Api</h1>
</body>
</html>